package com.zl.service.serviceImpl;

import com.zl.entity.po.Stu;
import com.zl.entity.po.StuExample;
import com.zl.mapper.StuMapper;
import com.zl.service.StuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.UUID;

/**
 * @author zhanglei2
 * @since 2019/12/11 11:50
 */
@Service
public class StuServiceImpl implements StuService {
    @Autowired
    private StuMapper mapper;

    @Override
    public List<Stu> getStuList() {
        Stu stu = new Stu();
        StuExample stuExample = new StuExample();
        List<Stu> list = mapper.selectByExample(stuExample);
        return list;
    }

    @Override
    public String insert(Stu stu) {
        try {
            mapper.insert(stu);
            return "200";
        }catch (Exception e){
            e.printStackTrace();
            return "400";
        }
    }
}
